package com.sky.service;

import com.sky.vo.OrderReportVO;
import com.sky.vo.SalesTop10ReportVO;
import com.sky.vo.TurnoverReportVO;
import com.sky.vo.UserReportVO;

import javax.servlet.http.HttpServletResponse;
import java.time.LocalDate;
import java.time.LocalDateTime;

public interface ReportService {

    /**
     * 营业额统计
     * @param begin
     * @param end
     * @return
     */
//    TurnoverReportVO turnoverStatistics(LocalDate begin, LocalDate end);

//    UserReportVO userStatistics(LocalDate begin, LocalDate end);

//    OrderReportVO ordersStatistics(LocalDate begin, LocalDate end);

//    SalesTop10ReportVO top10Statistics(LocalDate begin, LocalDate end);
    /**
     * 根据时间区间统计营业额
     * @param beginTime
     * @param endTime
     * @return
     */
    TurnoverReportVO getTurnover(LocalDate beginTime, LocalDate endTime);

    UserReportVO getUserStatistics(LocalDate begin, LocalDate end);
    /**
     * 根据时间区间统计订单数量
     * @param begin
     * @param end
     * @return
     */
    OrderReportVO getOrderStatistics(LocalDate begin, LocalDate end);

    Integer getOrderCount(LocalDateTime beginTime, LocalDateTime endTime, Integer status);

    /**
     * 查询指定时间区间内的销量排名top10
     * @param begin
     * @param end
     * @return
     */
    SalesTop10ReportVO getSalesTop10(LocalDate begin, LocalDate end);

    /**
     * 导出近30天的运营数据
     * @param httpServletResponse
     */
    void export(HttpServletResponse httpServletResponse);
}
